#!/bin/sh /etc/rc.common

# Put this script at /etc/init.d/godns
# To start: `service godns start`
# To enable (i.e. auto-start on boot): `service godns enable`

USE_PROCD=1
START=98
PROG="/path/to/your/godns-dir/godns"
CONF="/path/to/your/godns-dir/config.json"

start_service() {
        procd_open_instance
        procd_set_param command "$PROG"
        procd_append_param command -c="$CONF"
        #procd_set_param stdout 1 # if enabled, log will go into syslog
        procd_set_param stderr 1
        procd_set_param respawn 600 10 10
        procd_close_instance
}

